package com.pyb.config;

import com.pyb.Interceptor.MyInterceptor2;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.handler.MappedInterceptor;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/1/16 9:36
 * @注释
 */
@Configuration
public class MvcConfig {
    @Bean
    public MappedInterceptor logInterceptor() {
        return new MappedInterceptor(null, new MyInterceptor2());
    }
    @Bean
    public MappedInterceptor loginInterceptor() {
        return new MappedInterceptor(new String[]{"/**"}, new String[]{"/"}, new MyInterceptor2());
    }
}
